<script setup lang="ts">
import { useGlobalStorage } from '@/stores/global.ts'

const globalStorage = useGlobalStorage()
const toggle = globalStorage.toggleVisibleMessage

</script>

<template>
  <div class="room-name">
    <span class="room-name-title">官方群</span>
    <IconFont icon="return" :size="20" class="return-but" @click="toggle" />
  </div>
</template>

<style scoped lang="scss">
.room-name {
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 100;
  background-color: var(--background-mask);
  backdrop-filter: blur(200px); // 添加模糊效果
  border-radius: 0 0 10px 10px;
  padding: 0 30px;
  .room-name-title {
    padding: 10px 0;
    color: var(--font-main);
    span {
      font-size: 16px;
    }
  }
  .return-but {
    display: none;
  }
}

@media (max-width: 768px) {
  .room-name {
    justify-content: space-between;
    .return-but {
      display: block;
      color: white;
    }
  }
}
</style>
